package com.netty.bfport.http.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.netty.bfport.http.domain.dto.TUserMachineDTO;
import com.netty.bfport.http.mapper.UserMachineMapper;
import com.netty.bfport.http.service.UserMachineService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Author: zhaoyang
 * @Data: 2022/3/23 23:18
 * @Description
 */
@Service
public class UserMachineServiceImpl implements UserMachineService {
    @Resource
    UserMachineMapper userMachineMapper;

    @Override
    public PageInfo<TUserMachineDTO> userMachineList(String name, String telephone, String equipmentId, Integer page, Integer size) {
        PageHelper.startPage(page,size);
        return new PageInfo<>(userMachineMapper.userMachineList(name, telephone, equipmentId));
    }


    public int userMachineAdd(TUserMachineDTO tUserMachineDTO) {
        return userMachineMapper.userMachineAdd(tUserMachineDTO);
    }


}
